﻿<Window x:Class="Infrastructure.WpfClient.Views.ExceptionBox.ExceptionBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
        Loaded="Window_Loaded"
        WindowStartupLocation="CenterScreen" ResizeMode="NoResize" 
        MinWidth="400" MinHeight="400" MaxHeight="600" Topmost="True" WindowStyle="SingleBorderWindow" Background="Silver" SizeToContent="WidthAndHeight">
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="110"></RowDefinition>
            <RowDefinition Height="*" MaxHeight="300"  ></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" MaxWidth="400" ></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Label  Name="lblTitle" Grid.Row="0" Grid.ColumnSpan="2">
            Execution Error
        </Label>
        <TextBox Name="lblErrorMessage"  TextWrapping="Wrap" 
                 Grid.Row="1" Grid.Column="0" Height="100">
        </TextBox>
        <Expander Header="Detail" Grid.ColumnSpan="1" Grid.Row="2">
            <TextBox  Name="lblErrorDetail" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Visible">
            </TextBox>
        </Expander>

        <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.ColumnSpan="2">
            <Button  Style="{DynamicResource ButtonStyle}" Name="btnCopyToClipboard" Content="Copy to Clipboard" Grid.Column="1" Grid.Row="3" Width="100" Click="btnCopyToClipboard_Click"></Button>
            <Button Style="{DynamicResource ButtonStyle}" Name="btnOk" Content="Ok" Grid.Column="1" Grid.Row="3"  Width="100" Click="btnOk_Click" IsDefault="True" IsCancel="True"></Button>
        </StackPanel>
        <Expander Grid.RowSpan="2" Grid.Row="1" Grid.Column="1" ExpandDirection="Right" Header="Mail">
            <GroupBox Header="Mailing">
                <StackPanel Orientation="Vertical">
                    <TextBlock Text="Message" Style="{DynamicResource TextBlockStyle}"></TextBlock>
                    <TextBox  Name="txtMessage" Style="{DynamicResource TextBoxStyle}" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Visible" Height="50" Width="150"  Text="{Binding EmailMessage}">
                    </TextBox>
                    <TextBlock Text="Copy To" Style="{DynamicResource TextBlockStyle}"  >
                    </TextBlock>
                    <TextBox  Name="txtCopyto" Style="{DynamicResource TextBoxStyle}" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Visible" Text="{Binding CopyTo}" >
                    </TextBox>
                    <TextBlock Text="Reply" Style="{DynamicResource TextBlockStyle}">
                    </TextBlock>
                    <TextBox  Name="txtReplyTo" Style="{DynamicResource TextBoxStyle}" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Visible" Text="{Binding ReplyTo}"  >
                    </TextBox>

                    <Button Style="{DynamicResource ButtonStyle}" Name="btnSendMail" Content="Send by mail" Grid.Column="0" Grid.Row="3"   Width="100" Click="btnSendMail_Click"></Button>
                </StackPanel>
            </GroupBox>
        </Expander>
    </Grid>
</Window>
